const { Submit } = require('../utils/db')

const writeSubmit = (id, file_name, time_limit, memory_limit, cases, code, state) => {
    const submit = new Submit({
        id,
        file_name,
        time_limit,
        memory_limit,
        cases,
        code,
        state,
    })
    return submit.save()
}

module.exports = {
    writeSubmit,
}